New cars are confusing. With all the computers, sensors, gizmos, and gadgets, it's hard not to wonder if there's some sort of magical witchcraft and wizardry taking place under the hood. How do all these systems work? Let's take a look at some of the most common automotive computer control systems to see exactly what all those ones and zeros are up to.
If the heart of a car is its engine, then its brain must be its Engine Control Unit (ECU). Also known as a Powertrain Control Module (PCM), the ECU controls actuators within an internal combustion engine to optimize vehicle performance. A car’s ECU is primarily responsible for four tasks. Firstly, the ECU controls the fuel mixture within the combustion chamber. Secondly, the ECU controls idle speed. Thirdly, the ECU is responsible for ignition timing. Lastly, in some applications, the ECU controls valve timing. Before we delve any deeper into ECUs, lets first talk about how automobiles of the past went about controlling fuel mixture.
To optimize engine performance, engineers want to ensure that enough air is mixed with gasoline so that all of the gasoline is burned, and its energy is fully utilized. Such a mixture where all of the fuel is burned is known as a stoichiometric mixture. As the energy density of gasoline is very high (34 mega Joules per liter), it is vital that all of the fuel is burned during combustion. If not enough air is provided, the engine will run rich, often resulting in black smoke exiting the tailpipe. If there is too much air mixed with the fuel, the engine runs lean, producing less power and more heat. Therefore, engineers must optimize this ratio to gain the most mechanical work per unit mass of fuel. The optimum ratio of air to fuel for a typical combustion engine is about 14.7 pounds of air for every pound of gasoline. The question of how to assure this perfect ratio has been at the forefront of automotive engineering design for decades.
In the late nineteenth century, considered the beginning of the automotive timeline, the mechanism by which fuel and air were mixed was a carburetor. Originating from the French word “carburer,” which means “to carburize,” the carburetor is a purely mechanical device that was used to mix air and fuel up until the early 1990s (The 1991 Jeep Grand Wagoneer was the last American production vehicle to utilize a carburetor). To understand how carburetors work, you have to understand the Bernoulli principle. Shown below, the Bernoulli principle demonstrates that an increase of a fluid’s velocity (kinetic energy) necessitates a decrease in pressure (potential energy):
p1, rho1, and v1 are the initial static pressure, density, and velocity, respectively. p2, rho2, and v2 are the static pressure, density, and velocity at another location in the flow. In a carburetor, we can assume that the density of the fluid is remaining approximately constant, so ρ1 is about the same as ρ2. Let's say that at point 2 downstream, we have a narrowing where the velocity increases. This means v2 is greater than v1. For the left and right sides of the Bernoulli equation to remain equivalent, p1 must be greater than p2. Thus, the high velocity at the narrowing yields low pressure.
Though many see carburetors as magical contraptions that house all sorts of voodoo, a carburetor is essentially just a tube through which filtered air flows from the automobile’s air intake. Within this tube, there is a narrowing, or a venturi, where a vacuum is created. There is a small hole in the narrowing called a jet which is fed fuel via the float chamber. The float chamber is a container filled with an amount of fuel that is set via a float. The vacuum created in the venturi draws in fuel from the float chamber, which is at ambient pressure. The faster the filtered air comes in through the carburetor throat, the lower the pressure in the venturi. This leads to a higher pressure difference between the venturi and the float chamber, and thus more fuel flows out of the jet and mixes with the airstream.
Downstream of the jet, there is a throttle valve that opens when the accelerator pedal is engaged. This throttle valve restricts how much air enters the carburetor. If you push the gas pedal all the way down, the throttle valve opens fully, allowing air to flow more quickly through the carburetor, creating a bigger vacuum in the venturi, sending more fuel into the engine, creating more power. At idle, the throttle valve is fully shut, but there is an idling jet that bypasses the throttle valve and sends a set amount of fuel and air into the engine. Without an idling jet, the engine would shut off if the throttle were not activated by the driver. Check out the video below.
Image Credit: Uber Prutser
FUEL INJECTION AND THE ECU
Now that we've looked at the old school way of controlling fuel mixture and idle, let's have a look at the modern ECU. First, we'll talk about idling. In most ECU’s, there is an idle speed control built in. The rotational speed of the engine is monitored via the crankshaft position sensor, which is commonly a Hall Effect sensor or optical sensor that reads the rotational speed of the crank pulley, engine flywheel, or the crankshaft itself. The ECU sends fuel to the engine based upon how fast the crankshaft rotates, which is directly related to the load on the engine. All serpentine belt-drive systems exert a load on the crankshaft, for which the ECU must compensate by injecting more fuel to the engine. When you turn your air conditioning on, for example, the ECU notices a decrease in crankshaft speed, and immediately compensates by sending more fuel to the engine. This is the beauty of feedback control.
Now let's look at how the ECU controls the air/fuel mixture. On old cars, adjusting the fuel ratio required adjusting a couple screws on the carburetor. But new vehicles use fuel injection systems that incorporate a multitude of sensors to detect whether the engine is operating optimally. The readings from these sensors are sent back to the ECU, which can make necessary adjustments to correct for sub-optimal air/fuel ratios. Among the sensors that the ECU uses to ensure that the engine is working properly are: the engine temperature sensor, the throttle position sensor, the knock sensor, and the oxygen sensor. The computer uses information from these sensors to adjust spark timing, fuel injection, and idle speed to ensure that the engine is running efficiently.
When a driver pushes the gas pedal, an accelerator pedal position sensor (APP) sends a signal to the ECU, which then commands the throttle to open. The ECU takes information from the throttle position sensor until the throttle has reached the desired position set by the APP. The mass air flow sensor (MAF) or Manifold Absolute Pressor Sensor (MAP) determines how much air is entering the cylinders and send the information to the ECU. The ECU uses this information to decide how much fuel to inject into the cylinders in order to keep the mixture stoichiometric. The computer continually uses the TPS to check the throttle’s position and the MAF or MAP sensor to check how much air is flowing through the intake in order to inject the appropriate amount of fuel into the engine.
Now that we've mentioned the ECU’s tasks of maintaining engine idle speed, as well as maintaining a proper air/fuel mixture, let's talk about ignition timing. To achieve optimum operation, the spark plug must be provided with current at very precise moments, usually about 10 to 40 crankshaft degrees prior to top dead center. This of course depends upon engine speed, as when the engine is at a lower speed, the spark should occur less frequently than if the engine were near redline. The exact moment that the sparkplug fires relative to the piston’s position is optimized to facilitate the development of peak pressure. This allows the engine to recover a maximum amount of work from the expanding gas.
The ECU is able to monitor the piston’s position via the crankshaft position sensor. The ECU continually receives information from the crankshaft position sensor and uses it to optimize spark timing. If the ECU receives information from the knock sensor (which is nothing more than a small microphone) that the engine has developed a knock (which is often caused by premature spark ignition), the ECU can retard ignition timing so as to alleviate the knock. The ECU uses input from a variety of sensors to adjust spark timing to optimize performance.
Finally, the fourth major function of the ECU is to adjust valve timing. During normal operation, the relationship between when the intake valve opens and the exhaust valve opens is set. Valves are opened via the lobes on a camshaft. With dual overhead cam engines, there is a separate camshaft for exhaust valves and intake valves. These camshafts are connected to the crankshaft via timing belts, chains, or gears. What does this mean? Well, since we’re using a four-stroke cycle, this means that the camshaft rotates two times for every crankshaft rotation. If this seems confusing, consider an intake stroke of an engine. The intake valve is open, meaning the camshaft lobe is pushing down on the valve. Lets trace the motion of this cam lobe. Use the below figure for reference. While the intake valve is open, the piston moves down toward bottom dead center. Once the engine has reached bottom dead center, the crankshaft has rotated 180 degrees. Then the piston moves up to compress the fuel mixture. Once the piston has reached top dead center, the crankshaft has made a full rotation. Next, the sparkplug ignites the fuel mixture, sending the piston back down to bottom dead center. At this point, the crankshaft has turned one and a half full rotations. Now the exhaust valve opens, and the piston moves back up to top dead center. The crankshaft has rotated two full revolutions. Now that the crankshaft is at top dead center, the camshaft lobe that we are monitoring comes back around and opens the intake valve and the piston moves back down. Thus, after two revolutions of the crankshaft, the camshaft has rotated once. This demonstrates the concept of “fixed” valve timing. The relative position between the camshaft and crankshaft is fixed.
How long do the valves remain open? That depends upon the camshaft lobe shape and the engine speed. Most engines have fixed valve timing. This means that these engines are only most efficient at a single engine speed. To optimize engine performance at all engine speeds, engineers use what is known as variable valve timing (VVT).
Photo Credit: 4.D
VARIABLE VALVE TIMING
There are two major types of variable valve timing: cam phasing and cam changing. With cam changing, the actual shape of the camshaft is being altered, whereas with cam phasing, the camshaft phase angle can be advanced or retarded (usually only by fewer than 5 degrees in either direction). This “advancement” or “retardation” is relative to the “fixed” position that the camshaft would assume relative to the crankshaft.
By retarding the camshaft’s timing, the engine achieves better high RPM power, whereas advancing the intake camshaft’s timing produces better power at low RPM. To better understand this, consider a high speed application. At high engine speeds, the engine requires large amounts of air. Thus, it is beneficial to allow the intake valves to remain open a bit longer. How does the engine know when to alter the camshaft phase or camshaft profile? It uses sensors of course. The ECU utilizes the crankshaft position sensor and the camshaft position sensor to monitor the relationship between the piston’s location and the valve’s positions (whether they are open or shut). Remember that the crankshaft position sensor tells the ECU the engine speed. Thus, with the information from these two sensors, the ECU can learn how fast the engine is rotating and the relative position of the piston to the valves. The ECU can then send a signal to a hydraulic or electric actuator which changes camshaft phase angle or cam profile. There are numerous different methodologies used to vary valve timing. Each manufacturer has its own name for its own VVT system. Toyota uses VVT-i®, Honda uses VTEC®, Mitsubishi uses MIVEC®, and the list goes on. Let's see how Toyota’s VVT-i system works.
In the VVT system shown in the video above (a variation of Toyota’s VVT-i), the ECU receives signals from the camshaft sensor, crankshaft sensor, oil temperature sensor, mass air flow sensor (MAF), and the engine coolant temperature sensor. The ECU uses the engine coolant temperature do determine how warm the engine is. If the engine is cold, the ECU feeds more fuel to the engine to warm it up. The ECU uses the MAF sensor’s output to adjust fuel injection based on how much air is flowing into the engine. The crankshaft sensor and camshaft sensors tell the ECU the relative placement of the piston and the valves. The ECU uses all of this information to adjust its output signal to an oil control valve. The system uses a hydraulic actuator to rotate a rotor to change cam phase angle. The rotor rotates a certain angle based on the hydraulic input sent from the oil control valve, which receives its input from the ECU. Once the ECU has changed the cam angle, the ECU continues to receive inputs from all of these sensors and continues to adjust the oil feed to the rotor.
Other VVT systems change the shape of their camshafts, not just the angle relative to the crankshaft. The video below, whose narrator strangely sounds a lot like Richard Hammond , is a great resource for understanding the two different types of VVT systems.
Photo Credit: Storm Crypt
CHECK ENGINE LIGHT
The ECU can also utilize the input it receives from various sensors to warn the driver that something has gone wrong by triggering a “Check Engine” light on the dashboard. Since 1996, all passenger cars have been outfitted with Onboard Diagnostics II (OBDII). When the “Check Engine” light in your vehicle comes on, it means that the ECU has received a signal from a sensor that is unsatisfactory. What qualifies as an unsatisfactory signal is determined by engineers or lawmakers. For example, in many cases the “Check Engine” light can be triggered by a loose or faulty gas cap. Ultimately, a loose gas cap can lead to the expulsion of harmful fuel vapors into the air. Automobile manufacturers are mandated by law to keep fuel vapor expulsion to a very low level. An Evaporative Emission Control System (EVAP) checks for fuel vapor leaks by running diagnostic self checks. These self checks involve introducing a purge vacuum into the fuel system. If the system is leak free, the vacuum will hold. If the vacuum cannot be held for a certain amount of time, it indicates a leak, and the EVAP sensor will send a fault to the computer. Similar systems are used throughout the automobile.
To detect an exhaust leak, for example, there is an oxygen sensor in the exhaust pipe. All of these sensors feed information to the ECU, and the ECU determines whether or not the sensor readings are acceptable. To determine why the check engine light is on, you can attach an OBDII scanner to the OBDII port usually located near the driver footwell. The scanning tool sends a series of codes to the engine computer. These codes are known as On-Board Diagnostics Parameter ID’s or simply PIDs. These PIDs request certain information from the computer. All data is transferred using bit encoded notation. It is through PIDs that the scanner and the engine computer are able to communicate. The mechanic is then able to read from the scanner a code which correlates to a certain fault. See the link below for a list of standard PIDs.
ANTILOCK BRAKING SYSTEM
The basic idea behind an Antilock Braking System (ABS) is that static friction coefficients are usually larger than coefficients of kinetic friction. It is static (rolling) friction that allows your vehicle to move forward. When you hit the brakes, you therefore want your vehicles to slowly roll to a stop so as to ensure that the wheels are slowing down due to static friction, not sliding friction (kinetic). A standard Antilock Braking System uses four wheel speed sensors. These sensors can be optical, magnetic, or hall effect. The ABS system also consists of two hydraulic valves. The ECU in the ABS system monitors the speed of each wheel using the wheel speed sensors. If the ECU sees that one wheel is moving significantly slower than the others, it actuates the hydraulic valves to reduce the brake pressure applied to that wheel. This allows the wheel to turn faster. If one wheel is turning significantly faster than the others, the ECU sends more pressure to that wheel’s caliper to slow it down. This is the basic concept of ABS brakes, and as you can see, computers play a large part.
Photo Credit: Karma Motorsports (Speedin')
ELECTRONIC STABILITY CONTROL
A spinoff of ABS, electronic stability control (ESC) is a computerized control system that applies brakes to individual wheels and reduces engine power to ensure that drivers maintain control of their vehicles. Invented in the mid 1990’s by Mercedes, this now-mandatory system (as of 2012) has been shown to drastically reduce the risk of automobile accidents. In fact, the Insurance Institute for Highway Safety claims that one third of all fatal accidents could have been prevented had this technology existed sooner. The five main components of an ESC system are: wheel speed sensors, the control module, the steering angle sensor, the yaw rate sensor, and the hydraulic unit.
To understand how this system works, imagine you are driving down the highway at 60 miles per hour. You swerve left to avoid hitting a raccoon. What happens in the short duration to follow? The yaw rate sensor determines where your car is pointing, the steering angle sensor determines where your front wheels are pointing, and the wheel speed sensors monitor each wheel’s speed. Since you turn your wheel abruptly to the left, your vehicle will initially under steer. This is simply Newton’s First Law. Since the front tires do not yet have enough traction, the car continues to move forward. The control module recognizes the discrepancy between the intended path (communicated by the steering angle sensor) and the actual path (communicated via the yaw rate sensor) and sends a signal to the hydraulic unit, directing it to increase braking power to the left rear wheel. This causes the automobile to rotate left (the desired response). If necessary, the control module will reduce engine power as well.
Note that if the car were in an over steer situation (one in which the tail of the car wanted to rotate), the control module would apply braking to the front outside wheel to keep the vehicle under control. For a great demonstration of the effects of this technology, see the video below:
Traction control works in a similar way as ESC. If a vehicle is unable to gain traction in icy conditions, one wheel will spin while the other simply remains stationary. This is the nature of an open differential: the wheel with the least traction receives the most power. This is undesirable in low-traction situations. As such, traction control can step in. Traction control monitors wheel speed using wheel speed sensors like those mentioned in the above ESC section. If a wheel is slipping, traction control will reduce engine power to help the wheel regain traction. If necessary, traction control can also apply the brakes to the slipping wheel. This may transfer power to the wheel with higher traction, depending on surface conditions.
Photo Credit: dodge challenger1
ELECTRONIC THROTTLE CONTROL: FLY BY WIRE
Electronic Throttle Control (ETC) is the automobile industry’s “Fly by Wire” system. With ETC, there is no longer a mechanical linkage between the accelerator pedal and the throttle. In the past, the throttle was attached to the accelerator pedal via a metal cable known as a Bowden Cable. With modern Electronic Throttle Control systems, ECUs use information from the throttle position sensor, the accelerator position sensor, engine speed sensor, and vehicle speed sensor to determine which position to adjust the throttle to. Note that the throttle position sensor comes in two flavors: a potentiometer and a Hall Effect Sensor. Usually automakers use Hall Effect sensors since with a potentiometer, wiping contact against a resistance element can lead to dirt buildup, wear, and thus bad readings.
It is important to realize that Electronic Throttle Control is a closed loop system. The throttle opens based on user input (which is transmitted to the ECU via the accelerator pedal sensor), and adjusts based on readings from the throttle position sensor and speed sensors. Consider the feedback loop below. If you suddenly step on the accelerator, the accelerator position sensor provides the “reference input.” It indicates where we truly want our throttle to be. If we push the accelerator to the floor, we want the throttle to be fully open. The measured output is the current position of the throttle (which is transmitted to the computer via the throttle position sensor). The discrepancy between where the user wants the throttle and where the throttle currently is is the “measured error.” The computer reads this error, and adjusts its signal to the throttle actuator to open the throttle further. The new position is read via the sensor, and the process begins again.
A major benefit of “fly by wire” systems is that it allows for easy integration of systems such as adaptive cruise control, brake override systems, and electronic stability control.
TORQUE VECTORING DIFFERENTIALS
Seen on vehicles like the Mitsubishi Lancer Evolution, torque vectoring is the process by which a computer controls the amount of torque sent to each wheel based on a variety of sensor readings. Steering angle sensors and wheel speed sensors are the most important in this application. In an all wheel drive vehicle, typically a set amount of torque is sent to the front and rear wheels under optimum conditions. For example, in dry conditions, the Audi R8 uses an 85/15 rear wheel-drive bias system. That is, the rear wheels nominally receive 85% of the engine’s torque. When wheel slip occurs, the wheel speed sensors quickly send a signal to the computer, which sends a signal to actuators (clutches), which then send torque to the front wheels. Normally, with all wheel drive vehicles, there are three differentials: a center differential, a front differential, and a rear differential. A center differential is responsible for apportioning power to front and rear axles. The front and rear differentials distribute power between left and right wheels. Thus, computers are able to allot power to any individual wheel by taking sensor input and using it to trigger actuators in any of the three differentials.
Photo Credit: Stuart MacNeil
ADAPTIVE CRUISE CONTROL
Most modern adaptive cruise control systems are radar-based. The radar, which is usually mounted behind or below the grill, scans the area in front of the vehicle for slower moving cars or objects. Imagine that you are driving behind a vehicle at a set speed. You can set adaptive cruise control just like you’d set any other cruise control, except, with adaptive cruise control, you can also set “gap distance.” The “gap distance” is the set distance between your vehicle and the vehicle in front of you. If the vehicle in front of you slows down and comes within your preset gap distance, the radar sends a signal to the engine computer. The engine computer then uses the brakes to slow your vehicle down. Once the vehicle in front of you has sped up or moved aside, your vehicle will continue at its preset speed.
Photo Credit: Greg Myers
ACTIVE NOISE CONTROL
All automobile companies have departments devoted to the reduction of noise, vibration, and harshness (NVH). NVH departments are responsible for the development of sound proofing materials, suspension damping, and much more. Infinity has developed a sophisticated active noise control system. This system acts very much like noise canceling headphones in that it uses the car’s speakers to decrease interior noise. In essence, active noise control reads the sound in the cabin via small microphones located in the cabin. The aim is to use input from the microphones, as well as input from the crankshaft position sensor (which monitors engine speed) to generate sound waves in opposite phase to undesirable low frequency engine and exhaust sounds. Ultimately, this system uses the concept of destructive wave interference to rid of unwanted cabin noise.
Photo Credit: Inhabitat Blog
MULTI-ZONE CLIMATE CONTROL
With multi-zone climate control systems found in automobiles, not everyone in the car must agree on a single set temperature. There can be a multitude of temperature zones in one car. How does this work? There are temperature sensors in each “temperature zone” which monitor the temperature in that zone. If the temperature in that zone drops below the user specified temperature, the heat will come on in this zone to compensate. Of course, this requires more vents and HVAC controls than a typical HVAC system, but this is nonetheless a clever application of feedback control.
Photo Credit: Stanley Johnson
The final computer control system we’ll talk about is a fun one: launch control. BMW M series, Nissan GTR, Bugatti Veyron, SRT Viper: all of these cars use launch control to help the driver accelerate from a standstill to achieve the best “launch.” How does this system work? Well, the user puts the vehicle in launch control mode. He or she then puts one of his or her feet on the brake, and the other on the gas pedal. The engine sets the engine speed to a set RPM. Once the user releases the brake, the car launches. The engine computer uses traction control to avoid spinning the driven wheels, and applies the appropriate amount of throttle to not only get up to speed as quickly as possible, but also to avoid over-stressing drive train components.
Photo Credit: Calgary Reviews
The biggest innovations in the automobile industry in the past decade have been software-based, not hardware based. Electronic fuel injection has allowed automakers to optimize power and efficiency. ABS and electronic stability control have saved thousands of lives. The modern On Board Diagnostics system has allowed owners to quickly diagnose and fix their vehicles. Systems such as launch control and traction control have allowed us to get the best performance from our vehicles. These systems comprise but a small fraction of the computer control systems found in modern automobile. They done wonders to make cars safer, more efficient, and more capable than ever.
Cover Photo Credit: John Morris